﻿using log4net;
using Microsoft.AspNetCore.Mvc.Filters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace ConsumerMQ.Models
{
    public class HttpGlobalExceptionFilter : IExceptionFilter
    {
        private ILog log;

        public HttpGlobalExceptionFilter()
        {
            this.log = LogManager.GetLogger(Startup.repository.Name, typeof(ChapterLister));
   
        }
        public void OnException(ExceptionContext context)
        {
            log.Error(context.Exception.ToString());
        }
    }
}
